package com.mm.fam.auth.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mm.fam.auth.service.ShiroUserService;
import com.mm.fam.web.entity.SysUser;
import com.mm.fam.web.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ShiroUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ShiroUserService {
    @Autowired
    private SysUserMapper sysUserMapper;


    @Override
    public SysUser getUserByUserName(String userName) {
        QueryWrapper<SysUser> wrapper = new QueryWrapper<>();
        wrapper.eq(true,"username",userName);
        return getOne(wrapper);
    }
}
